package ldh.im.admin.dao;

import ldh.im.admin.pojo.Authority;
import ldh.im.admin.pojo.where.AuthorityWhere;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author: ldh
* @date: 2019-10-25 12:35:05
*/
public interface AuthorityDao {

	Integer insert(Authority authority);

	Integer insertSelective(Authority authority);

	Integer updateById(Authority authority);
	
	Integer updateNotNullById(Authority authority);
	
	Integer deleteById(Long id);

	Integer updateByName(Authority authority);
	
	Integer updateNotNullByName(Authority authority);
	
	Integer deleteByName(@Param("name") String name);

	Authority getById(Long id);

	List<Authority> getByIds(List<Long> ids);

//	Authority getJoinAuthorityById(Long id);
//
//	Authority getJoinUserById(Long id);

	Authority getManyRolesById(Long id);

	Authority getByName(@Param("name") String name);

//	Authority getJoinModuleByName(String name);

	List<Authority> findByAuthorityWhere(AuthorityWhere authorityWhere);
	
	Long findTotalByAuthorityWhere(AuthorityWhere authorityWhere);
	
	List<Authority> findJoinByAuthorityWhere(AuthorityWhere authorityWhere);
	
	Long findJoinTotalByAuthorityWhere(AuthorityWhere authorityWhere);
	
}
